<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .father {
            width: 800px;
            height: 800px;
            border: 1px solid burlywood;
            /* 弹性盒子 */
            /*
               flex-direction 属性:
               row:主轴（水平）
               row-reverse:主轴倒序
               column:垂直
               column-reverse:垂直倒序

               flex-wrap属性:
               wrap:换行
               nowrap:不换行
               wrap-reverse:换行倒序
               nowrap-reverse:不换行倒序

               flex-flow 是flex-direction和flex-wrap结合
               flex-flow:row nowrap-reverse

               justify-content: 定义元素在主轴上的排列 (start和beteween最常用 )
               flex-start:左对齐
               flex-end:右对齐
               center:居中对齐
               space-between:两端对齐
               space-around:环绕对齐

               align-items:定义元素在交叉轴上的排列 （center最常用 ）
               flex-start：起点开始对齐
               flex-end:末尾开始对齐
               center:中心对齐
               stretch：不设置值时对齐
               baseline 和元素的line-height对齐

               align-content:定义元素在垂直轴上的排列（注意 align-content一定要结合flex-wrap:wrap一起使用）
               space-around:跟轴线对齐

            */
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;
        }

        .father div {
            width: 300px;
            /* height: 300px; */
            line-height: 200px;
            font-size: 40px;
            font-weight: 700;
            color: #fff;
            text-align: center;
        }

        .father .item:nth-child(1) {
            background-color: red;
            width: 100px;
        }

        .father .item:nth-child(2) {
            background-color: blue;
            width: 200px;
        }

        .father .item:nth-child(3) {
            background-color: yellow;
            width: 300px;
        }
    </style>
</head>

<body>
<div class="father">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
</div>
</body>

</html>
